1. Field of the Invention
The present invention relates to a technique for inspecting pattern on an object.
2. Description of the Background Art
In the field of appearance inspection of pattern formed on a semiconductor substrate, a color filter, a shadow mask, a high-definition printed circuit board or the like, pattern of lead frame, pattern of photomask used for forming these patterns or the like, conventionally, a comparison check method has been mainly performed with multitone images. For example, a differential absolute value image which indicates absolute values of the difference in pixel between an inspection image (an image to be inspected) and a reference image is obtained and a region in the differential absolute value image which has pixel values larger than a predetermined threshold value is detected as a defect.
In the comparison check method, since it is premised that conditions such as dynamic range and brightness of the inspection image and the reference image are equal, in order to remove an effect of variation in dynamic range, brightness and the like, also performed is a method of detecting defects after normalizing a pixel value distribution by linear transformation so that pixel values of an image should be appropriately distributed in a predetermined range.
As disclosed in Japanese Patent Application Laid Open Gazette No. 2002-22421, proposed is a method of removing an effect of variation in sharpness of image (in other words, variation in graininess) by calculating a standard deviation of signed difference in pixel value between the inspection image and the reference image and normalizing a histogram of the differential absolute value image on the basis of the standard deviation.
In some cases, the pixel value becomes as large as that in a defective portion in some region of the differential absolute value image due to an effect of a surface state of an object to be picked up or an image pickup part (such as a charge-up phenomenon which is found in an image picked up by using an electron beam like an SEM) and the like. An unnecessary increase in pixel value of the differential absolute value image is caused, in many cases, in an extremely local region consisting of several pixels, and in such a case, it is impossible to appropriately detect a defect by correction of pixel value in a conventional macroscopic method.
In a case where, for example, dynamic ranges of the inspection image and the reference image are matched with each other in a region consisting of about 100×100 pixels, an effect of variation in pixel value produced entirely on this region can be removed but the variation in pixel value caused by the charge-up phenomenon and the like in the region consisting of several pixels is still incorrectly detected as a defect.
FIG. 1 is a view showing incorrect detection of a defect due to the charge-up phenomenon. In FIG. 1, assuming that ideal values of pixel in a line 911 of an inspection image 91 (e.g., values of an reference image) are shown in graph 921 and actual pixel values are shown in graph 922, pixel values of the differential absolute value image are shown in graph 923.
As indicated by reference sign 922a in graph 922, when the pixel value is deviated from the ideal value due to a defect, the pixel value of the differential absolute value image becomes larger as indicated by reference sign 923a in graph 923, and this allows detection of the defect. When values of several pixels are deviated from the ideal value as indicated by reference sign 922b in graph 922, however, a defect is incorrectly detected as indicated by reference sign 923b in graph 923. Such a local wrong detection can not be avoided by the conventional method.